#ifndef BLOCKINV_H
#define BLOCKINV_H
class BlockInv
{
    public:
    float *hashsift,*hashsiftptr;
    float *geo_x,*geo_xptr;
    float *geo_y,*geo_yptr;
    float *geo_scale,*geo_scaleptr;
    float *geo_angle,*geo_angleptr;
    int *imageid;
    int *termfq;
    BlockInv(int maxtokennum = MAXTOKEN_PER_BLOCK)
    {
        cout << "blockinv constructor" << endl;
        hashsiftptr = hashsift = new float[maxtokennum*HAMMING_DIM];
        geo_xptr = geo_x = new float[maxtokennum];
        geo_yptr = geo_y = new float[maxtokennum];
        geo_scaleptr = geo_scale = new float[maxtokennum];
        geo_angleptr = geo_angle = new float[maxtokennum];
        imageid = new int[maxtokennum];
        termfq = new int[maxtokennum];
    }

    ~BlockInv()
    {
        cout << "blockinv destructor" << endl;
    }
    void clear()
    {
        geo_xptr = geo_x;
        geo_yptr = geo_y;
        geo_scaleptr = geo_scale;
        geo_angleptr = geo_angle;
        hashsiftptr = hashsift;
    }
    void free()
    {
        cout << " free the memory of blockinv" << endl;
        delete[] geo_x;
        delete[] geo_y;
        delete[] geo_scale;
        delete[] geo_angle;
        delete[] hashsift;
        delete[] imageid;
        delete[] termfq;
    }
};
#endif
